#include "dyn_interpolation_linear.h"

double LinearInterpolation::rawInterpolation(int _index, double x)
{
    if (xValues(_index)==xValues(_index+1))
        return yValues(_index);
    else
        return yValues(_index)
                + ((x-xValues(_index))/(xValues(_index+1)-xValues(_index)))*(yValues(_index+1)-yValues(_index));
}
